/**
 * @author		Sergey Suzdalskiy
 * @e-mail:		sergey.suzdalskiy@gmail.com
 */
package ua.kiev.gcore.ui.controls
{
	
	import flash.display.DisplayObject;
	
	public class VBox extends Box
	{
		public function VBox()
		{
			super();
		}
		
		override protected function resize():void{
			super.resize();
			var dHeight:Number = 0;
			for(var i:int = 0; i < numChildren; i++){
				var displayObject:DisplayObject = getChildAt(i);
				displayObject.x = 0;
				displayObject.y = dHeight;
				dHeight += (getChildAt(i).height + spacing);
			}
		}
	}
}